Repository navigation
fix(agc): keep robustBufferAccess2 off on AMD's proprietary driver - #7351
Merged
oneandonlydean merged 1 commit intoOct 18, 2026
Merged
Conversation
Since boykopovar#4048 enabled robustBufferAccess2, AMD's Windows driver draws nothing in agc_driver_layered_volume_draw and agc_driver_layered_volume_vertex, and the selected loads make the high half of agc_driver_subvector_loop's wave64 skip its loop. Until the cause is found, that driver does not get the feature, and its loads keep their selections. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
11 tasks done
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
12 tasks done
12 tasks done
11 tasks done
12 tasks done
12 tasks done
thuanquang
added a commit
to thuanquang/AnyPS5
that referenced
this pull request
Oct 20, 2026
boykopovar#7351 kept robustBufferAccess2 off on AMD's proprietary driver because enabling it broke agc_driver_layered_volume_draw, agc_driver_layered_volume_vertex and agc_driver_subvector_loop on an RX 6700 XT. With boykopovar#7623 and boykopovar#7828 on main, those tests pass with the feature on, in either library-mode order. This reverts 48b394d and keeps the record of boykopovar#7623's empty-mask test in the s_subvector_loop debt entry. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged
12 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
#4048, merged today, enables
robustBufferAccess2on every device that has it, and then selects guest loads instead of branching around them. On an RX 6700 XT with AMD's Windows driver 32.0.21045.5002, three execution tests that passed onmainf1af6c591fail from its merge63da333b7on:agc_driver_layered_volume_draw;agc_driver_layered_volume_vertex;agc_driver_subvector_loop.Lavapipe on CI passes the first two and skips the third (its subgroup is too small).
To narrow it down I built
mainwith each half of #4048 switched off:main5229b5b82withrobustBufferAccess2not enabled (and so no selected loads)target.robustBufferAccess2 = false(loads keep their selections)So the two layered-volume tests fail as soon as the feature is enabled on this driver, whatever the recompiler emits.
subvector_loopfails only with the selected loads.The failures:
vertex draw: slice 1 texel (0, 0) channel 0 is 64, expected 255 (the band of layer 0): the volume keeps its sentinel, so nothing reached it.subvector_loop.exec kept by the body, initial exec high half: lane 0 exec hi after the loop is 0, expected 4294967295. With every column printed, the high half of the wave64 never runs its loop body. A wave64 compute probe that only loadsInput[lane]and stores it back returns the right values in every lane for the same masks, so the load itself is correct. A compute probe of the vertex shader's two loads (buffer_load_dwordx4andbuffer_load_dword offset:28, idxen, stride 32) also reads every record correctly.I haven't found the cause. This change doesn't enable
robustBufferAccess2onVK_DRIVER_ID_AMD_PROPRIETARY, so on that driver the loads keep their selections as they do on devices without the feature, and the three tests pass again. Other drivers are unchanged. The check followsPipelineLinkTimeOptimizationUsable: a predicate inExecution/include, unit-tested over the driver IDs. The load-guard debt entry from #4048 says what was seen on this driver.@Mouad-Scriptz-0, in case the numbers above point you to the cause, the gate can go again once it is fixed.
Tested
Windows 11 26200, AMD Radeon RX 6700 XT (gfx1031), driver 32.0.21045.5002, WinLibs GCC 15.2.0 r7, Release,
BUILD_TESTING=ON,ANYPS5_REQUIRE_VULKAN=1:main5229b5b82and pass with this change. Bisected: they pass onf1af6c591, the merge before perf(recompiler): select guest memory loads instead of branching around them #4048, and fail on63da333b7.agc_robust_buffer_access(new) checks the predicate for the AMD proprietary, AMD open-source, RADV, NVIDIA, Intel, lavapipe and MoltenVK driver IDs.agc_guarded_memory_loadsandagc_lds_lock_budgetfrom perf(recompiler): select guest memory loads instead of branching around them #4048 pass.agc_driver_lds_lock_budgetfails with and without this change:lane 0 read 0x00000ffffffff800, expected 0x00001ffffffff000 after 4096 ds_add_u64 and 4096 ds_add_u32. That is the AMD LDS lock problem reported in AGC: AMD device-backed LDS lock-budget case returns half of expected sum #7344, the same one asagc_driver_lds_mixed_width_atomics(AGC: 64-bit LDS atomics under the workgroup lock never finish in workgroups over 64 threads on AMD RDNA 2 (Windows) #6666, fix(shader): release the LDS lock with an exchange and drop fences inside it #6976).ctest --parallel 4 --timeout 120onmain5229b5b82with this change: 1442 tests. Onlyagc_driver_lds_mixed_width_atomics(fix(shader): release the LDS lock with an exchange and drop fences inside it #6976),agc_driver_lds_lock_budget(AGC: AMD device-backed LDS lock-budget case returns half of expected sum #7344) andagc_driver_layered_volume_vertex_no_gpl(AMD Windows: GPL-mode cache failures (alpha/wave32 pass after local driver update) #4768) fail. Without this change,agc_driver_layered_volume_draw,agc_driver_layered_volume_vertexandagc_driver_subvector_loopfail as well.python tools/check_conventions.py --base origin/mainwith this title and body passes.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code